package cn.edu.scau.cmi.luoxintai.safecomponent;

import java.util.LinkedList;
import java.util.List;

public class Composite extends Component {
	private String name;
	private List<Component> children = new LinkedList<Component>();
	public Composite(String name) {
		this.name = name;
	}

	public void add(Component component) {
		children.add(component);
	}
	public void clear() {
		children.clear();
	}

	public String display() {
		return name;
	}

	public List<Component> getChildren() {
		return children;
	}
}

